#include "PacketUtils.h"
#include "../configuration/NetworkConfiguration.h"
#include "../network/PlayerClient.h"

using namespace Domain::Helpers::PacketUtils;

sf::Packet Domain::Helpers::PacketUtils::copyAndRemoveServerData(sf::Packet& org)
{
	sf::Packet packet_copy;
	const char* data = org.GetData();

	int offset = sizeof(Domain::Network::PlayerClient::PlayerId)
		+ sizeof(Domain::Configuration::Network::PACKET_TYPE_TYPE);
	packet_copy.Append(data + offset, org.GetDataSize() - offset);

	return packet_copy;
}
